package com.changgou.system.dao;

import com.changgou.system.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface AdminMapper extends Mapper<Admin> {
    @Insert("insert into tb_admin (login_name,`password`)VALUES (#{loginName},#{password}) where (select count(*) from tb_admin where login_name=#{loginName})=0)")
    void add(@Param("loginName")String loginName, @Param("password")String password);
}
